SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Chathuri Wimalasena, Suresh Marru - Apache Airavata
(Slide Contributions) Randy Abernethy - Apache Thrift
40%  discount  coupon  on  any  of  Manning  Publications  	
Coupon  code  -­‐‑  ********  	
(listen  through  the  end  for  decryption  key)  	
	
A  free  ebook:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  
Publications  Co.	
(listen  through  the  end  and  impress  us  to  win)    	
Red Alert:
FREE Stuff ….FREE as in
*  Image  Source:  hHp://blog.law.cornell.edu/voxpop/files/2012/05/VOX.Chicken.Crossing_FreeBeer.jpg
Outline
—  Introduction	
—  Apache  Thrift  	
—  Apache  Airavata	
—  Motivation  for  Airavata  to  explore  Thrift	
—  Airavata  API	
—  Road  to  Airavata  1.0	
—  Airavata  Thrift  based  architecture	
—  Experience  &  lessons  learned	
—  Discussion,  Q  &  A
—  Modern  distributed  
applications  are  rarely  
composed  of  modules  wriHen  
in  a  single  language	
—  Weaving  together  innovations  
made  in  a  range  of  languages  
is  a  core  competency  of  
successful  enterprises	
—  Cross  language  
communications  are  a  
necessity,  not  a  luxury	
Polyglotism
**  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co.	
*  Slide  source:  Randy  Abernethy.
—  A  high  performance,  scalable  cross  language  serialization  and  RPC  framework	
—  What?	
—  Full  RPC  Implementation  -­‐‑  Apache  Thrift  supplies  a  complete  RPC  solution:    
clients,  servers,  everything  but  your  business  logic	
—  Modularity  -­‐‑  Apache  Thrift  supports  plug-­‐‑in  serialization  protocols:    
binary,  compact,  json,  or  build  your  own	
—  Multiple  End  Points  –  Plug-­‐‑in  transports  for  network,  disk  and  memory  end  points,  
making  Thrift  easy  to  integrate  with  other  communications  and  storage  solutions  like  
AMQP  messaging  and  HDFS	
—  Performance  -­‐‑  Apache  Thrift  is  fast  and  efficient,  solutions  for  minimal  parsing  overhead  
and  minimal  size  	
—  Reach  -­‐‑  Apache  Thrift  supports  a  wide  range  of  languages  and  platforms:  
Linux,  OSX,  Windows,  Embedded  Systems,  Mobile,  Browser,  C++,  Go,  PHP,  Erlang,  
Haskell,  Ruby,  Node.js,  C#,  Java,  C,  OCaml,  ObjectiveC,  D,  Perl,  Python,  SmallTalk,  …	
—  Flexibility  -­‐‑  Apache  Thrift  supports  interface  evolution,  that  is  to  say,  CI  environments  can  
roll  new  interface  features  incrementally  without  breaking  existing  infrastructure.	
Apache Thrift
*  Slide  source:  Randy  Abernethy.
1.  Define  the  service  interface  in  IDL	
2.  Compile  the  IDL  to  generate  client/server  RPC  stubs  in  the  desired  
languages	
3.  Call  the  remote  functions  as  if  they  were  local  using  the  client  stubs	
4.  Connect  the  server  stubs  to  the  desired  implementation	
5.  Choose  a  prebuilt  Apache  Thrift  server  to  host  your  service	
thrift IDL
—  Streaming  –  Communications  characterized  by  an  
ongoing  flow  of  bytes  from  a  server  to  one  or  more  
clients.	
—  Example:  An  internet  radio  broadcast  where  the  client  
receives  bytes  over  time  transmiHed  by  the  server  in  an  
ongoing  sequence  of  small  packets.  	
—  Messaging  –  Message  passing  involves  one  way  
asynchronous,  often  queued,  communications,  producing  
loosely  coupled  systems.	
—  Example:  Sending  an  email  message  where  you  may  get  a  
response  or  you  may  not,  and  if  you  do  get  a  response  
you  don’t  know  exactly  when  you  will  get  it.	
—  RPC  –  Remote  Procedure  Call  systems  allow  function  
calls  to  be  made  between  processes  on  different  
computers.	
—  Example:  An  iPhone  app  calling  a  service  on  the  Internet  
which  returns  the  weather  forecast.	
Comm schemes
Apache  Thrift  is  an  efficient  cross  platform  
serialization  solution  for  streaming  interfaces	
Apache  Thrift  provides  a  complete  RPC  
framework	
**  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co.	
*  Slide  source:  Randy  Abernethy.
—  User  Code	
—  client  code  calls  RPC  methods  and/or  
[de]serializes  objects	
—  service  handlers  implement  RPC  service  
behavior	
—  Generated  Code	
—  RPC  stubs  supply  client  side  proxies  and  
server  side  processors	
—  type  serialization  code  provides  serialization  
for  IDL  defined  types	
—  Library  Code	
—  servers  host  user  defined  services,  managing  
connections  and  concurrency	
—  protocols  perform  serialization	
—  transports  move  bytes  from  here  to  there	
Architecture
**  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co.	
*  Slide  source:  Randy  Abernethy.
—  The  Thrift  framework  was  originally  developed  at  Facebook  and  
released  as  open  source  in  2007.  The  project  became  an  Apache  
Software  Foundation  incubator  project  in  2008,  after  which  four  early  
versions  were  released.	
—  0.9.1 	
released  2013-­‐‑07-­‐‑16	
—  0.9.2 	
Planned  2014-­‐‑06-­‐‑01	
—  1.0.0 	
Planned  2015-­‐‑01-­‐‑01	
Thrift Roadmap
it  is  difficult  to  make  
predictions,  particularly  
about  the  future.	
-­‐‑-­‐‑  Mark  Twain	
Open  Source	
Community  Developed	
Apache  License  Version  2.0	
**  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co.	
*  Slide  source:  Randy  Abernethy.
—  Web	
—  thrift.apache.org	
—  github.com/apache/thrift	
—  Mail	
—  Users:  user-­‐‑subscribe@thrift.apache.org	
—  Developers:  dev-­‐‑subscribe@thrift.apache.org	
—  Chat	
—  #thrift	
—  Book	
—  Abernethy  (2014),  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  
Publications  Co.      [hHp://www.manning.com/abernethy/]	
Thrift Resources
Chapter  
1  is  free	
*  Slide  source:  Randy  Abernethy.
Knowledge and Expertise
Computational
Resources
Scientific Instruments
Algorithms and
Models
Archived Data and
Metadata
Advanced Science Tools
Enabling & Democratizing Scientific Research
Science Gateways:
Few Noted Examples:
Airavata  API	
Security	
Launch  &  Manage    Jobs	
Save/Load  
configurations  and  
provenance  data	
Notify  progress  of  job  
or  workflow  execution	
Real-­‐‑Time  
Monitoring	
Execute  &  Manage  
Computations	
Data  Ingest  &  Discovery	
 Data  Movement	
Data  &  
Provenance  
Subsystem	
Job  &  
Workflow  
Subsystem	
Messaging  Subsystem	
i	
 Information  
Subsystem	
CIPRES	
Neuro  
Science	
Ultrascan	
BioVLAB	
GAAMP	
Param	
Chem	
Academic  &  
Commercial  
Clouds	
Inter-­‐‑	
national  
Grids	
Apache Airavata
Apache Airavata
Translating Science Gateway Language...
Interactivity through layers
Mathema'cal* Domain* Resource*
Model**
Refinement*
Uncertain)es+
Orchestra)on+level+Interac)ons+
Workflow**
Steering*
Parametric*
Sweeps*
Provenance*
Job+Level+Interac)ons+
Job*launch,*
gliding*
Checkpoint/**
Restart*
Asynchronous+
+refinements+
Applica)on+
Steering+
Challenges the API
Airavata API in a nutshell
—  Airavata  provides  a  API  to  science  gateway  developers  	
—  Science  gateways  =>  diverse  requirements	
—  Airavata  API  needs  to  be  	
—  Easy  to  understand  and  simple	
—  Generic  enough  to  support  different  gateways	
—  Existing  science  gateway  integration  should  be  smooth	
—  Flexible  for  changes  arising  with  different  requirements  of  science  
gateways
Earlier Airavata Architecture
(a simplified view - evolved over 10 years)
Road to Airavata 1.0
—  First  Approach  -­‐‑  SOAP  /  WS	
—  Pros  	
—  ability  to  separate  out  context  and  the  payload	
—  Already  proven  tools  and  techniques  (XML,  WSDL,  WS-­‐‑Security  etc)	
—  Clients  can  easily  generate  stubs  using  WSDLs	
—  Cons  	
—  Heavy  weight	
—  Data  schema  changes  cannot  be  handled  easily	
—  Could  not  support  broad  range  of  clients
Contd.. Road to Airavata 1.0
—  Second  Approach  -­‐‑  REST	
—  Pros  	
—  Flexible  for  data  representation  (JSON  or  XML)	
—  Light  weight	
—  BeHer  performance	
—  Cons  	
—  Multiple  object  layers      	
—  No  standard  way  to  describe  the  service  to  the  client
Key issues with earlier Airavata API
—  Only  java  clients  were  developed	
—  users  had  to  write  their  own  client  for  other  languages	
—  API  design  was  a  hybrid  model  	
—  Makes  it  more  complicated  internally	
—  Complex  data  objects  are  overwhelming  to  work  in  REST	
—  Lot  of  marshalling  /  unmarshalling  of  data  objects	
—  Unnecessary  need  for  a  servlet  container	
—  Overwhelming  number  of  methods  with  lots  of  overloaded  methods
Contd..Road to Airavata 1.0
—  Third  Approach  -­‐‑  RPC  style  tools  (Apache  Thrift,  Protocol  Buffers,  
Apache  Avro)	
—  Ability  to  communicate  easily  across  different  programming  languages	
—  Easy  way  to  generate  server  and  client  code
Why Apache Thrift
—  Apache  project	
—  For  Airavata  users,  a  client  library  that  can  consume  the  API  is  more  
important  than  an  open  API  like  REST	
—  Light  framework	
—  No  multiple  dependencies  and  servlet  containers.	
—  Easy  learning  curve  to  get  started	
—  If  carefully  crafted,  the  IDLs  and  framework  support  backward  and  
forward  compatibility
Clean  way  to  define  IDLs  with  richer  data  structures
Apache Thrift Integration with Airavata
●  Airavata  API  server  and  
Orchestrator  are  thrift  
services  at  the  moment	
●  Other  components  will  also  
become  thrift  services  in  the  
future
Apache Thrift Integration with Airavata
Experience: What we gain
—  Able  to  support  clients  wriHen  in  different  languages	
—  Clean  design	
—  Having  different  versions  of  servers	
—  TSimpleServer  -­‐‑  Simple  single  threaded  server	
—  TThreadPoolServer  -­‐‑  Uses  Java'ʹs  built  in  ThreadPool  management	
—  TNonblockingServer  -­‐‑  non-­‐‑blocking  TServer  implementation	
—  THsHaServer  -­‐‑  extension  of  the  TNonblockingServer  to  a  Half-­‐‑Sync/
Half-­‐‑Async  server
Experience Contd.. What we gain
—  No  need  of  marshalling  /  unmarshalling  -­‐‑  data  models  used  internally	
—  Server  is  very  robust  -­‐‑  able  to  handle  large  number  of  concurrent  
requests.  	
—  Easy  to  do  modifications  to  the  models,  since  code  is  auto-­‐‑generated	
—  Convenient  way  to  achieve  backward  compatibility
Lessons Learned
—  Modularize  the  data  models  in  order  to  ease  the  maintenance	
—  No  maven  plugin  at  the  moment,  hence  you  have  to  commit  auto-­‐‑
generated  code.
Lessons Learned Contd..
Lessons Learned Contd..
—  Thrift  has  limited  support  to  handle  null  values.	
—  Experiment  model  is  a  complex  model  with  lot  of  other  structs.	
—  Enums  cannot  be  passed  as  null  over  the  wire  even  they  are  specified  as  
optional  in  the  struct	
—  Thrift  has  limited  documentation  and  samples	
—  airavata  can  be  used  as  a  reference  	
—  hHps://github.com/apache/airavata
Future Directions
—  March  towards  Airavata  1.0  with  a  stable  API	
—  Exploring  next  generation  information  model  and  Messaging  Systems	
—  Ka{a,  flume,  fluend,  Scribe,  Hedwig….	
—  Refactor  Registry  Implementation  	
—  Airavata  architecture  to  support  multi-­‐‑tenanted  PAAS	
—  Motivated  by  a  downstream  open  source  project  SciGaP  –  Science  
Gateways  Platform  as  a  Service  
How you can participate/follow
—  Join  the  party  -­‐‑  Architecture  mailing  list	
—  BYOX  	
—  X  =  opinions,  software,  ideas,  code,  yourself  ..
Take Home
—  2  e  books  on  thrift	
—  awareness  of  thrift  and  airavata	
—  lessons  learned	
—  how  to  get  involved	
—  We  are  under  same  umbrella  for  a  reason,  lets  party  together	
—  Join  our  Architecture  List  and  help  	
—  Other  means??
Discussion, Q & A

Mais conteúdo relacionado

Mais procurados

Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonIgor Anishchenko
 
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...Impetus Technologies
 
Apache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePersonApache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePersonLivePerson
 
Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]LivePerson
 
Redis Modules API - an introduction
Redis Modules API - an introductionRedis Modules API - an introduction
Redis Modules API - an introductionItamar Haber
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantarIndicThreads
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisItamar Haber
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architectureElizabeth Smith
 
Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldSATOSHI TAGOMORI
 
Taming the resource tiger
Taming the resource tigerTaming the resource tiger
Taming the resource tigerElizabeth Smith
 
Redis v5 & Streams
Redis v5 & StreamsRedis v5 & Streams
Redis v5 & StreamsItamar Haber
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experienceIgor Anishchenko
 

Mais procurados (20)

Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
 
Facebook thrift
Facebook thriftFacebook thrift
Facebook thrift
 
Avro intro
Avro introAvro intro
Avro intro
 
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
 
Php’s guts
Php’s gutsPhp’s guts
Php’s guts
 
ApacheCon09: Avro
ApacheCon09: AvroApacheCon09: Avro
ApacheCon09: Avro
 
Apache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePersonApache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePerson
 
Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]
 
Hack and HHVM
Hack and HHVMHack and HHVM
Hack and HHVM
 
Redis Modules API - an introduction
Redis Modules API - an introductionRedis Modules API - an introduction
Redis Modules API - an introduction
 
Php extensions
Php extensionsPhp extensions
Php extensions
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
CBOR - The Better JSON
CBOR - The Better JSONCBOR - The Better JSON
CBOR - The Better JSON
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real World
 
Taming the resource tiger
Taming the resource tigerTaming the resource tiger
Taming the resource tiger
 
Redis v5 & Streams
Redis v5 & StreamsRedis v5 & Streams
Redis v5 & Streams
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
 
System Programming and Administration
System Programming and AdministrationSystem Programming and Administration
System Programming and Administration
 

Semelhante a RESTLess Design with Apache Thrift: Experiences from Apache Airavata

The other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needsThe other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needsgagravarr
 
Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...DataWorks Summit
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowKaxil Naik
 
Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...DataWorks Summit
 
Mission to NARs with Apache NiFi
Mission to NARs with Apache NiFiMission to NARs with Apache NiFi
Mission to NARs with Apache NiFiHortonworks
 
Portable Streaming Pipelines with Apache Beam
Portable Streaming Pipelines with Apache BeamPortable Streaming Pipelines with Apache Beam
Portable Streaming Pipelines with Apache Beamconfluent
 
Hail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceHail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceTimothy Spann
 
Internetandjava
InternetandjavaInternetandjava
Internetandjavamuniinb4u
 
JavaInternetlearning
JavaInternetlearningJavaInternetlearning
JavaInternetlearningmuniinb4u
 
Internetandjava
InternetandjavaInternetandjava
Internetandjavamuniinb4u
 
Javauserguide
JavauserguideJavauserguide
Javauserguidemuniinb4u
 
Realizing the promise of portability with Apache Beam
Realizing the promise of portability with Apache BeamRealizing the promise of portability with Apache Beam
Realizing the promise of portability with Apache BeamJ On The Beach
 

Semelhante a RESTLess Design with Apache Thrift: Experiences from Apache Airavata (20)

The other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needsThe other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needs
 
Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
 
Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...
 
Mission to NARs with Apache NiFi
Mission to NARs with Apache NiFiMission to NARs with Apache NiFi
Mission to NARs with Apache NiFi
 
Portable Streaming Pipelines with Apache Beam
Portable Streaming Pipelines with Apache BeamPortable Streaming Pipelines with Apache Beam
Portable Streaming Pipelines with Apache Beam
 
Api 101
Api 101Api 101
Api 101
 
Hail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceHail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open source
 
Internetandjava
InternetandjavaInternetandjava
Internetandjava
 
ppttips
ppttipsppttips
ppttips
 
ppttips
ppttipsppttips
ppttips
 
Java
JavaJava
Java
 
ppttips
ppttipsppttips
ppttips
 
JavaInternetlearning
JavaInternetlearningJavaInternetlearning
JavaInternetlearning
 
ppt tips
ppt tipsppt tips
ppt tips
 
ppttips
ppttipsppttips
ppttips
 
Internetandjava
InternetandjavaInternetandjava
Internetandjava
 
Javauserguide
JavauserguideJavauserguide
Javauserguide
 
Realizing the promise of portability with Apache Beam
Realizing the promise of portability with Apache BeamRealizing the promise of portability with Apache Beam
Realizing the promise of portability with Apache Beam
 
Cs2305 nol
Cs2305 nolCs2305 nol
Cs2305 nol
 

Mais de smarru

Cyberinfrastructure Experiences with Apache Airavata
Cyberinfrastructure Experiences with Apache AiravataCyberinfrastructure Experiences with Apache Airavata
Cyberinfrastructure Experiences with Apache Airavatasmarru
 
Apache Airavata Credential Store
Apache Airavata Credential StoreApache Airavata Credential Store
Apache Airavata Credential Storesmarru
 
Google Summer of Code at Apache Software Foundation
Google Summer of Code at Apache Software FoundationGoogle Summer of Code at Apache Software Foundation
Google Summer of Code at Apache Software Foundationsmarru
 
Gsoc airavata
Gsoc airavataGsoc airavata
Gsoc airavatasmarru
 
Learning Open Source through GSOC
Learning Open Source through GSOC Learning Open Source through GSOC
Learning Open Source through GSOC smarru
 
Apache Student Induction ApacheCon 2013
Apache Student Induction ApacheCon 2013Apache Student Induction ApacheCon 2013
Apache Student Induction ApacheCon 2013smarru
 
Apache Airavata ApacheCon2013
Apache Airavata ApacheCon2013Apache Airavata ApacheCon2013
Apache Airavata ApacheCon2013smarru
 
Ogce Workflow Suite
Ogce Workflow SuiteOgce Workflow Suite
Ogce Workflow Suitesmarru
 
Ogce Workflow Suite Tg09
Ogce Workflow Suite Tg09Ogce Workflow Suite Tg09
Ogce Workflow Suite Tg09smarru
 

Mais de smarru (9)

Cyberinfrastructure Experiences with Apache Airavata
Cyberinfrastructure Experiences with Apache AiravataCyberinfrastructure Experiences with Apache Airavata
Cyberinfrastructure Experiences with Apache Airavata
 
Apache Airavata Credential Store
Apache Airavata Credential StoreApache Airavata Credential Store
Apache Airavata Credential Store
 
Google Summer of Code at Apache Software Foundation
Google Summer of Code at Apache Software FoundationGoogle Summer of Code at Apache Software Foundation
Google Summer of Code at Apache Software Foundation
 
Gsoc airavata
Gsoc airavataGsoc airavata
Gsoc airavata
 
Learning Open Source through GSOC
Learning Open Source through GSOC Learning Open Source through GSOC
Learning Open Source through GSOC
 
Apache Student Induction ApacheCon 2013
Apache Student Induction ApacheCon 2013Apache Student Induction ApacheCon 2013
Apache Student Induction ApacheCon 2013
 
Apache Airavata ApacheCon2013
Apache Airavata ApacheCon2013Apache Airavata ApacheCon2013
Apache Airavata ApacheCon2013
 
Ogce Workflow Suite
Ogce Workflow SuiteOgce Workflow Suite
Ogce Workflow Suite
 
Ogce Workflow Suite Tg09
Ogce Workflow Suite Tg09Ogce Workflow Suite Tg09
Ogce Workflow Suite Tg09
 

Último

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Último (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

RESTLess Design with Apache Thrift: Experiences from Apache Airavata

  • 1. Chathuri Wimalasena, Suresh Marru - Apache Airavata (Slide Contributions) Randy Abernethy - Apache Thrift
  • 2. 40%  discount  coupon  on  any  of  Manning  Publications   Coupon  code  -­‐‑  ********   (listen  through  the  end  for  decryption  key)   A  free  ebook:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning   Publications  Co. (listen  through  the  end  and  impress  us  to  win)     Red Alert: FREE Stuff ….FREE as in *  Image  Source:  hHp://blog.law.cornell.edu/voxpop/files/2012/05/VOX.Chicken.Crossing_FreeBeer.jpg
  • 3. Outline —  Introduction —  Apache  Thrift   —  Apache  Airavata —  Motivation  for  Airavata  to  explore  Thrift —  Airavata  API —  Road  to  Airavata  1.0 —  Airavata  Thrift  based  architecture —  Experience  &  lessons  learned —  Discussion,  Q  &  A
  • 4. —  Modern  distributed   applications  are  rarely   composed  of  modules  wriHen   in  a  single  language —  Weaving  together  innovations   made  in  a  range  of  languages   is  a  core  competency  of   successful  enterprises —  Cross  language   communications  are  a   necessity,  not  a  luxury Polyglotism **  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co. *  Slide  source:  Randy  Abernethy.
  • 5. —  A  high  performance,  scalable  cross  language  serialization  and  RPC  framework —  What? —  Full  RPC  Implementation  -­‐‑  Apache  Thrift  supplies  a  complete  RPC  solution:     clients,  servers,  everything  but  your  business  logic —  Modularity  -­‐‑  Apache  Thrift  supports  plug-­‐‑in  serialization  protocols:     binary,  compact,  json,  or  build  your  own —  Multiple  End  Points  –  Plug-­‐‑in  transports  for  network,  disk  and  memory  end  points,   making  Thrift  easy  to  integrate  with  other  communications  and  storage  solutions  like   AMQP  messaging  and  HDFS —  Performance  -­‐‑  Apache  Thrift  is  fast  and  efficient,  solutions  for  minimal  parsing  overhead   and  minimal  size   —  Reach  -­‐‑  Apache  Thrift  supports  a  wide  range  of  languages  and  platforms:   Linux,  OSX,  Windows,  Embedded  Systems,  Mobile,  Browser,  C++,  Go,  PHP,  Erlang,   Haskell,  Ruby,  Node.js,  C#,  Java,  C,  OCaml,  ObjectiveC,  D,  Perl,  Python,  SmallTalk,  … —  Flexibility  -­‐‑  Apache  Thrift  supports  interface  evolution,  that  is  to  say,  CI  environments  can   roll  new  interface  features  incrementally  without  breaking  existing  infrastructure. Apache Thrift *  Slide  source:  Randy  Abernethy.
  • 6. 1.  Define  the  service  interface  in  IDL 2.  Compile  the  IDL  to  generate  client/server  RPC  stubs  in  the  desired   languages 3.  Call  the  remote  functions  as  if  they  were  local  using  the  client  stubs 4.  Connect  the  server  stubs  to  the  desired  implementation 5.  Choose  a  prebuilt  Apache  Thrift  server  to  host  your  service thrift IDL
  • 7. —  Streaming  –  Communications  characterized  by  an   ongoing  flow  of  bytes  from  a  server  to  one  or  more   clients. —  Example:  An  internet  radio  broadcast  where  the  client   receives  bytes  over  time  transmiHed  by  the  server  in  an   ongoing  sequence  of  small  packets.   —  Messaging  –  Message  passing  involves  one  way   asynchronous,  often  queued,  communications,  producing   loosely  coupled  systems. —  Example:  Sending  an  email  message  where  you  may  get  a   response  or  you  may  not,  and  if  you  do  get  a  response   you  don’t  know  exactly  when  you  will  get  it. —  RPC  –  Remote  Procedure  Call  systems  allow  function   calls  to  be  made  between  processes  on  different   computers. —  Example:  An  iPhone  app  calling  a  service  on  the  Internet   which  returns  the  weather  forecast. Comm schemes Apache  Thrift  is  an  efficient  cross  platform   serialization  solution  for  streaming  interfaces Apache  Thrift  provides  a  complete  RPC   framework **  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co. *  Slide  source:  Randy  Abernethy.
  • 8. —  User  Code —  client  code  calls  RPC  methods  and/or   [de]serializes  objects —  service  handlers  implement  RPC  service   behavior —  Generated  Code —  RPC  stubs  supply  client  side  proxies  and   server  side  processors —  type  serialization  code  provides  serialization   for  IDL  defined  types —  Library  Code —  servers  host  user  defined  services,  managing   connections  and  concurrency —  protocols  perform  serialization —  transports  move  bytes  from  here  to  there Architecture **  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co. *  Slide  source:  Randy  Abernethy.
  • 9. —  The  Thrift  framework  was  originally  developed  at  Facebook  and   released  as  open  source  in  2007.  The  project  became  an  Apache   Software  Foundation  incubator  project  in  2008,  after  which  four  early   versions  were  released. —  0.9.1 released  2013-­‐‑07-­‐‑16 —  0.9.2 Planned  2014-­‐‑06-­‐‑01 —  1.0.0 Planned  2015-­‐‑01-­‐‑01 Thrift Roadmap it  is  difficult  to  make   predictions,  particularly   about  the  future. -­‐‑-­‐‑  Mark  Twain Open  Source Community  Developed Apache  License  Version  2.0 **  Figure  source:  The  Programmer’s  Guide  to  Apache  Thrift,  Manning  Publications  Co. *  Slide  source:  Randy  Abernethy.
  • 10. —  Web —  thrift.apache.org —  github.com/apache/thrift —  Mail —  Users:  user-­‐‑subscribe@thrift.apache.org —  Developers:  dev-­‐‑subscribe@thrift.apache.org —  Chat —  #thrift —  Book —  Abernethy  (2014),  The  Programmer’s  Guide  to  Apache  Thrift,  Manning   Publications  Co.      [hHp://www.manning.com/abernethy/] Thrift Resources Chapter   1  is  free *  Slide  source:  Randy  Abernethy.
  • 11. Knowledge and Expertise Computational Resources Scientific Instruments Algorithms and Models Archived Data and Metadata Advanced Science Tools Enabling & Democratizing Scientific Research Science Gateways:
  • 13. Airavata  API Security Launch  &  Manage    Jobs Save/Load   configurations  and   provenance  data Notify  progress  of  job   or  workflow  execution Real-­‐‑Time   Monitoring Execute  &  Manage   Computations Data  Ingest  &  Discovery Data  Movement Data  &   Provenance   Subsystem Job  &   Workflow   Subsystem Messaging  Subsystem i Information   Subsystem CIPRES Neuro   Science Ultrascan BioVLAB GAAMP Param Chem Academic  &   Commercial   Clouds Inter-­‐‑ national   Grids Apache Airavata
  • 18. Airavata API in a nutshell —  Airavata  provides  a  API  to  science  gateway  developers   —  Science  gateways  =>  diverse  requirements —  Airavata  API  needs  to  be   —  Easy  to  understand  and  simple —  Generic  enough  to  support  different  gateways —  Existing  science  gateway  integration  should  be  smooth —  Flexible  for  changes  arising  with  different  requirements  of  science   gateways
  • 19. Earlier Airavata Architecture (a simplified view - evolved over 10 years)
  • 20. Road to Airavata 1.0 —  First  Approach  -­‐‑  SOAP  /  WS —  Pros   —  ability  to  separate  out  context  and  the  payload —  Already  proven  tools  and  techniques  (XML,  WSDL,  WS-­‐‑Security  etc) —  Clients  can  easily  generate  stubs  using  WSDLs —  Cons   —  Heavy  weight —  Data  schema  changes  cannot  be  handled  easily —  Could  not  support  broad  range  of  clients
  • 21. Contd.. Road to Airavata 1.0 —  Second  Approach  -­‐‑  REST —  Pros   —  Flexible  for  data  representation  (JSON  or  XML) —  Light  weight —  BeHer  performance —  Cons   —  Multiple  object  layers       —  No  standard  way  to  describe  the  service  to  the  client
  • 22. Key issues with earlier Airavata API —  Only  java  clients  were  developed —  users  had  to  write  their  own  client  for  other  languages —  API  design  was  a  hybrid  model   —  Makes  it  more  complicated  internally —  Complex  data  objects  are  overwhelming  to  work  in  REST —  Lot  of  marshalling  /  unmarshalling  of  data  objects —  Unnecessary  need  for  a  servlet  container —  Overwhelming  number  of  methods  with  lots  of  overloaded  methods
  • 23. Contd..Road to Airavata 1.0 —  Third  Approach  -­‐‑  RPC  style  tools  (Apache  Thrift,  Protocol  Buffers,   Apache  Avro) —  Ability  to  communicate  easily  across  different  programming  languages —  Easy  way  to  generate  server  and  client  code
  • 24. Why Apache Thrift —  Apache  project —  For  Airavata  users,  a  client  library  that  can  consume  the  API  is  more   important  than  an  open  API  like  REST —  Light  framework —  No  multiple  dependencies  and  servlet  containers. —  Easy  learning  curve  to  get  started —  If  carefully  crafted,  the  IDLs  and  framework  support  backward  and   forward  compatibility
  • 25. Clean  way  to  define  IDLs  with  richer  data  structures
  • 26. Apache Thrift Integration with Airavata ●  Airavata  API  server  and   Orchestrator  are  thrift   services  at  the  moment ●  Other  components  will  also   become  thrift  services  in  the   future
  • 27. Apache Thrift Integration with Airavata
  • 28. Experience: What we gain —  Able  to  support  clients  wriHen  in  different  languages —  Clean  design —  Having  different  versions  of  servers —  TSimpleServer  -­‐‑  Simple  single  threaded  server —  TThreadPoolServer  -­‐‑  Uses  Java'ʹs  built  in  ThreadPool  management —  TNonblockingServer  -­‐‑  non-­‐‑blocking  TServer  implementation —  THsHaServer  -­‐‑  extension  of  the  TNonblockingServer  to  a  Half-­‐‑Sync/ Half-­‐‑Async  server
  • 29. Experience Contd.. What we gain —  No  need  of  marshalling  /  unmarshalling  -­‐‑  data  models  used  internally —  Server  is  very  robust  -­‐‑  able  to  handle  large  number  of  concurrent   requests.   —  Easy  to  do  modifications  to  the  models,  since  code  is  auto-­‐‑generated —  Convenient  way  to  achieve  backward  compatibility
  • 30. Lessons Learned —  Modularize  the  data  models  in  order  to  ease  the  maintenance —  No  maven  plugin  at  the  moment,  hence  you  have  to  commit  auto-­‐‑ generated  code.
  • 32. Lessons Learned Contd.. —  Thrift  has  limited  support  to  handle  null  values. —  Experiment  model  is  a  complex  model  with  lot  of  other  structs. —  Enums  cannot  be  passed  as  null  over  the  wire  even  they  are  specified  as   optional  in  the  struct —  Thrift  has  limited  documentation  and  samples —  airavata  can  be  used  as  a  reference   —  hHps://github.com/apache/airavata
  • 33. Future Directions —  March  towards  Airavata  1.0  with  a  stable  API —  Exploring  next  generation  information  model  and  Messaging  Systems —  Ka{a,  flume,  fluend,  Scribe,  Hedwig…. —  Refactor  Registry  Implementation   —  Airavata  architecture  to  support  multi-­‐‑tenanted  PAAS —  Motivated  by  a  downstream  open  source  project  SciGaP  –  Science   Gateways  Platform  as  a  Service  
  • 34. How you can participate/follow —  Join  the  party  -­‐‑  Architecture  mailing  list —  BYOX   —  X  =  opinions,  software,  ideas,  code,  yourself  ..
  • 35. Take Home —  2  e  books  on  thrift —  awareness  of  thrift  and  airavata —  lessons  learned —  how  to  get  involved —  We  are  under  same  umbrella  for  a  reason,  lets  party  together —  Join  our  Architecture  List  and  help   —  Other  means??