making programs talk

Download Making Programs Talk

Post on 22-Jun-2015

499 views

Category:

Software

1 download

Embed Size (px)

DESCRIPTION

Slides for my Desert Code Camp presentation on inter-program communication.

TRANSCRIPT

  • 1. MAKING PROGRAMS TALKMICHAEL F. COLLINS, IIIDESERT CODE CAMPOCTOBER 18, 2014

2. ABOUT ME PRODUCT ARCHITECT/LEAD DEVELOPER FOR NEURON ESB, A MESSAGINGMIDDLEWARE PRODUCT 20+ YEAR CAREER (1994-2014) STUDIED COMPUTER ENGINEERING AT CSU SACRAMENTO (GO HORNETS!) CURRENTLY WORK FOR NEUDESIC (6+ YEARS); PRIOR EMPLOYERS INCLUDESOGETI USA, JDA SOFTWARE, KAISER IT, NONSTOP SOLUTIONS, PEOPLESOFT,AND OTHERS DEVELOP FOR WINDOWS, LINUX, MAC OSX, IOS, ANDROID, AND OTHERPLATFORMS FAVORITE LANGUAGES: C#, C++, JAVA, RUBY, PYTHON, GO, ERLANG 3. CONTACT ME EMAIL: MICHAEL.COLLINS@NAKEDCODERS.BIZ MICHAEL.COLLINS@NEUDESIC.COM TWITTER: @MFCOLLINS3 SKYPE: MFCOLLINS3 LINKED IN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELFCOLLINS3/ 4. WHY ARE WE HERE? HOW DO TWO OR MORE PROGRAMS TALK? HOW CAN PROGRAMS COLLABORATE TO GET WORK DONE? WHAT STRATEGIES EXIST FOR PROGRAM COLLABORATION? WHAT ARE THE PITFALLS OF MULTI-PROGRAM DEVELOPMENT? 5. PARENT-CHILD PROCESSES PARENT PROCESS SPAWNS A CHILDPROCESS STANDARD I/O STREAMS ARE USEDTO CONTROL AND COLLECTFEEDBACK: 1 INPUT STREAM (STDIN) 2 OUTPUT STREAMS (STDOUT,STDERR)ParentChild 6. PARENT-CHILD PROCESSES PARENT SENDS A COMMAND TO THECHILD USING STDIN CHILD SENDS A RESPONSE BACK TOTHE PARENT USING STDOUT CHILD CAN OUTPUT DIAGNOSTICINFORMATION (LOG DATA; DEBUGMESSAGES) USING STDERRParentChild 7. PARENT-CHILD PROCESSES SINGLE RESPONSIBILITY PRINCIPAL A PROGRAM SHOULD HAVE ONE REASON TO CHANGE DO ONE THING AND DO IT WELL GUI FOR COMMAND-LINE INTERFACE (CLI) PRESENT A GUI OVER POWERSHELL SCRIPTS OR COMMAND-LINE PROGRAMS USE A TEXT PROTOCOL EASY TO DEBUG FROM THE COMMAND LINE CAN BE SCRIPTED OR AUTOMATED FOR TESTING 8. DEMOPARENT-CHILD PROCESSES 9. DISTRIBUTED PROCESSESClient Server 10. DISTRIBUTED PROCESSES SOAP REST/HTTP PROTOCOL BUFFERS APACHE THRIFT SOCKETSClient Server 11. DISTRIBUTED PROCESS PROTOCOLSSOAPXML-BASED PROTOCOLPROVEN TECHNOLOGYGREAT .NET SUPPORT (WCF)STANDARDS FOR SECURITY,RELIABILITY, DISCOVERY,METADATALIMITED SUPPORT FOR OTHERPLATFORMS/LANGUAGESRESTHTTP-BASEDLOW BARRIER TO ENTRYHIGHLY PORTABLE BETWEENPLATFORMS AND LANGUAGESMOST LANGUAGES HAVE BASICHTTP SUPPORTSTABLE SECURITY STANDARDS(HTTPS, OAUTH)THRIFTHIGHLY PORTABLE BETWEENPLATFORMS AND LANGUAGESSTANDARD FOR METADATAAPI-BASEDSECURITY THROUGH SSL 12. DISTRIBUTED PROCESSES USE THE BEST PROTOCOL FOR YOUR PROJECT DO YOU NEED ADVANCED SECURITY, DISCOVERABILITY, DISTRIBUTED TRANSACTIONS,RELIABILITY, AND YOURE ON .NET ONLY? USE WCF AND SOAP DO YOU NEED PORTABILITY AND THE ABILITY FOR MULTIPLE TECHNOLOGIES TOINTEGRATE? USE REST OR THRIFT ARE YOU EXPOSING A PUBLIC API OVER THE INTERNET? USE REST ARE YOUR SERVICES FOR AN INTERNAL INTERNET? USE THRIFT 13. DEMODISTRIBUTED PROCESSES 14. ASYNCHRONOUS MESSAGINGBrokerParticipant Participant Participant 15. ASYNCHRONOUS MESSAGING COMMUNICATION IS HANDLED VIAONE-WAY MESSAGES SENT BETWEENPARTICIPANTS A BROKER PROVIDES SERVICES SUCHAS A MESSAGE QUEUE OR PUBLISH-SUBSCRIBEARCHITECTURE TODELIVER MESSAGES TO RECEIVERSBrokerParticipantParticipantParticipant 16. ASYNCHRONOUS MESSAGING POINT-TO-POINT: DELIVERED ATMOST ONCE PUBLISH-SUBSCRIBE: DELIVERED TOALL SUBSCRIBERSBrokerParticipantParticipantParticipant 17. ASYNCHRONOUS MESSAGING MESSAGES MAY BE PERSISTED BEFOREBEING DELIVERED SOME MESSAGES CAN BE PROCESSEDIN A TRANSACTION RELIABLE MESSAGING IF APARTICIPANT IS UNAVAILABLEBrokerParticipantParticipantParticipant 18. ASYNCHRONOUS MESSAGING POISON MESSAGE QUEUE: MESSAGESTHAT CAUSE FAILURES DEAD LETTER QUEUE: MESSAGESTHAT EXPIRE BEFORE BEINGDELIVERED RELIABLE == NO MESSAGE LOSS! GUARANTEED == MESSAGE WILL BEDELIVERED, OR YOU WILL KNOWTHAT IT WAS NOT DELIVEREDBrokerParticipantParticipantParticipant 19. ASYNCHRONOUS MESSAGING MSMQ MQ SERIES ACTIVE MQ RABBIT MQ ZEROMQBrokerParticipantParticipantParticipant 20. ASYNCHRONOUS MESSAGING PATIENCE IS YOUR FRIEND TEST, TEST, TEST CAPTURE POISON MESSAGES AND DEADLETTER MESSAGES ANYTHING YOU DO SLOWS YOUR SYSTEMDOWN PERSISTENCE TRANSACTIONS GUARANTEED DELIVERY MAXIMIZE I/O 21. DEMOASYNCHRONOUS MESSAGING 22. Q&AASK ME ANYTHING! 23. NEUDESIC IS HIRING! ARE YOU ONE OF THE BEST SOFTWARE DEVELOPERS IN THE DESERT? IF YES,WHAT ARE YOU WAITING FOR? NEUDESIC HIRES THE BEST-OF-THE-BEST AND IS LOOKING FOR TALENTEDSOFTWARE DEVELOPERS, UX DESIGNERS, BI DEVELOPERS, QA ENGINEERS, ANDPROJECT MANAGERS! PHOENIX IS ONE OF THE BEST LOCATIONS TO WORK IN! JOIN A GROWING COMPANY AND MAKE IT MORE SUCCESSFUL!!! EMAIL ME YOUR RESUME TODAY: MICHAEL.COLLINS@NEUDESIC.COM 24. CONTACT ME (AGAIN) EMAIL: MICHAEL.COLLINS@NAKEDCODERS.BIZ MICHAEL.COLLINS@NEUDESIC.COM TWITTER: @MFCOLLINS3 SKYPE: MFCOLLINS3 LINKED IN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELFCOLLINS3/