What's a clean way to build a class for interfacing to backend server?

OK so a quick run down of what I'm trying to do. I've got a C++/Python server running next to some hardware that's generating some data that I want to interact with. I'm writing a front end in Java that can be run anywhere, and connects back to the server through standard TCP sockets. What I want to do now is write a class that connects back to the server and does little house keeping things like change the source of a datastream, etc etc.
I could write all those functions as static methods, but then each one would need to re-authenticate with the server each time, because I can't keep a socket open and accessible to static methods (right?). This, of course, will slow things down a lot. So I'd like to find some other way of doing it. Couple of caveats:
1) Needs to be accessible from everywhere
2) I would prefer not to instantiate a controller class and then pass it down through constructors and such, as that gets messy fast.
Does anyone have any suggestions on how to do this?

Aha, being relatively new to python I didn't realize that it was possible to write a static variable. I think this will work!

Similar Messages

  • What is the best way to build an app?

    what is the best way to build an app?

    I've never done it, but sure, all sorts of companies will contract to code up an application for you - big companies like Honeywell and General Dynamics to Joe Programmer free-lancing out of his house will contract for computer coding projects.  Without knowing details of the app to be developed I have no idea what it would cost or how long it would take.  Some of the free-lance programmers I personally know bill out at over (some, well over) $100/hour.
    If you really think your idea is great, then be sure to approach discussing it with a developer as a business transaction.  Almost every company will have an unsolicted ideas policy in place (Apple explicitly does under their legal information page) and any unsolicited ideas sent in become the intellectual property of the company (by sending the idea unsolicited, you have legally "given" it to them).
    P.S. as to how long to learn how to program well?  Some people spend an entire college degree's worth of time and effort to master that.

  • What is the best way to deal with memory leak issue in sql server 2008 R2

    What is the best way to deal with memory leak issue in sql server 2008 R2.

    What is the best way to deal with memory leak issue in sql server 2008 R2.
    I have heard of memory leak in OS that too because of some external application or rouge drivers SQL server 2008 R2 if patched to latest SP and CU ( may be if required) does not leaks memory.
    Are you in opinion that since SQL is taking lot of memory and then not releasing it is a memory leak.If so this is not a memory leak but default behavior .You need to set proper value for max server memory in sp_configure to limit buffer pool usage.However
    sql can take more memory from outside buffer pool if linked server ,CLR,extended stored procs XML are heavily utilized
    Any specific issue you are facing
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • What is the best way to create shared variable for multiple PXI(Real-Time) to GUI PC?

    What is the best way to create shared variable for multiple Real time (PXI) to GUI PC? I have 16 Nos of PXI system in network and 1 nos of GUI PC. I want to send command to all the PXI system with using single variable from GUI PC(Like Start Data acquisition, Stop data Acquisition) and I also want data from each PXI system to GUI PC display purpose. Can anybody suggest me best performance system configuration. Where to create variable?(Host PC or at  individual PXI system).

    Dear Ravens,
    I want to control real-time application from host(Command from GUI PC to PXI).Host PC should have access to all 16 sets PXI's variable. During communication failure with PXI, Host will stop data display for particular station.
    Ravens Fan wrote:
    Either.  For the best performance, you need to determine what that means.  Is it more important for each PXI machine to have access to the shared variable, or for the host PC to have access to all 16 sets of variables?  If you have slowdown or issue with the network communication, what kinds of problems would it cause for each machine?
    You want to located the shared variable library on whatever machine is more critical.  That is probably each PXI machine, but only you know your application.
    Ravens Fan wrote:
    Either.  For the best performance, you need to determine what that means.  Is it more important for each PXI machine to have access to the shared variable, or for the host PC to have access to all 16 sets of variables?  If you have slowdown or issue with the network communication, what kinds of problems would it cause for each machine?
    You want to located the shared variable library on whatever machine is more critical.  That is probably each PXI machine, but only you know your application.

  • What is the best way to have Mac setup for sync-ing 2 calendars?  Any way to change? When we 1st got our Macbook we unknowingly set it up wrong--as 2 separate users, with separate everything. Good for contacts and email, bad for calendar, photos, music.

    What is the best way to have Mac setup for sync-ing 2 calendars?  Any way to change?  When we first got our Macbook we unknowingly set it up as 2 separate users, with separate everything.  Now I have an iphone and I want to sync calendars but not contacts or email.  Any direction you could give would help! thx

    Anyone...anyone? Bueller...Bueller?

  • What is the best way to follow the scenario for Out look integration with share point using SAP Gateway?

    1)what is the best way to follow the scenario for Out look integration with share point using SAP Gateway?
    2)workflow concepts for Purchase order?
    3)Email triggering from out look for an approval process of PO? how these scenario can be best implemented with updated functions in Duet Enterprise.

    Hi,
    I do not have much idea on gateway integration with outlook but found out this document GWPAM Workflow Template which can be helpful for you to start with.
    also you may want to post your question in SAP Microsoft Interoperability forum
    Regards,
    Chandra

  • What is the best way to erase my computer for personal stuff while leaving the computer ready to use

    what is the best way to erase my computer for personal stuff while leaving the computer ready to use

    If the Mac came with Mountain Lion or Lion, press Command, Option and R keys on boot, open Disk Utility, erase the disk and reinstall Lion or Mountain Lion. If it came with Snow Leopard or older, insert the DVD, press C key on boot, go to Utilities > Disk Utility, erase the drive and reinstall Snow Leopard

  • What is the best way to increase the volume for the phone?  My Dad has a hearing aid and could use more volume.

    What is the best way to increase the volume for the phone?  My Dad has a hearing aid and could use more volume.

    https://itunes.apple.com/gb/app/hearyounow-your-personal-sound/id569522474?mt=8
    Have a look here and in particular
    "Customers also bought "

  • I am getting pop ups on safari and firefox lately and am worried i may have malware or something now on my computer doing this. What is the best way to check this out for sure and remove it?

    I am getting pop ups on safari and firefox lately and am worried I may have malware or something now on my computer doing this. What is the best way to check this out for sure and remove it?

    Please review the options below to determine which method is best to remove the Adware installed on your computer.
    The Easy, safe, effective method:
    http://www.adwaremedic.com/index.php
    If you are comfortable doing manual file removals use the somewhat more difficult method:
    http://support.apple.com/en-us/HT203987
    Also read the articles below to be more prepared for the next time there is an issue on your computer.
    https://discussions.apple.com/docs/DOC-7471
    https://discussions.apple.com/docs/DOC-8071
    http://www.thesafemac.com/tech-support-scam-pop-ups/

  • What is the best way to build a career path where I can evolve into an SAP role instead of one that is Customer Service based?

    In October 2011, my previous employer converted to SAP, as the rest of the worldwide entities were already using SAP. At that time, I was an Order Coordinator, where my job role was to process all of the Inside/Outside Sales Representatives orders for the US. Because of my keen attention to detail, the speed in which I learn new roles and general IT knowledge, I was asked to be the SAP SuperUser for our Financial Operations team. I quickly began to learn the roles of Order-to-Cash, Customer Master Data, Pricing Conditions, Contracts, some Material Master Data, and even Customer/Material Pricing Audits. I also performed manual customer billing in SAP until the automatic modules were implemented. Knowledge of these roles created a need for me to become a trainer to my team, where the SAP Consultants left off. After only working in SAP for the few months after the conversion started, I evolved out of an Order Coordinator rights of access and was given a not-so-typical role as an "analyst". I had more than a firefighter role in SAP, as my normal log in credentials gave me full rights to all of these modules and even special reporting. Our parent global company realized necessity for my role and followed proper protocol to authorize the access changes to still meet the SOx regulations. Prior to using SAP, I never thought I'd fall in love with it and enjoy my job so much, but it happened! Despite my previous employer's less than perfect data that was copied into SAP, we managed to have an efficient ongoing process to clean it all up.  I became more of a liaison between Financial Operations and our IT Dept/SAP Consultants. I "translated" the technical steps that IT/SAP Consultants were trying to teach everyone and trained my Financial Operations team in a way they would understand. I truly enjoyed my job, even at our most difficult moments.
    However, after all of the fun I was having while working in SAP and truly gaining a ton of useful experience and knowledge, "life" happened and I had an opportunity to move from Atlanta, GA to southern California. I've searched for months to find a new career here in California with a company that I could continue my learning experiences and become more proficient in SAP, but I'm a little lost. My search to find jobs have only given me possibilities in Customer Service positions or ones that are SAP sales/programming based. I'm floating in limbo and looking for help from the SAP community on where I can go from here to get back into a career path with SAP.
    I'm 28 years old and I'm currently finishing my Associate degree in Business Administration. I'm a Microsoft Certified Professional (MCP), certified with the Help-Desk Institute as a Support Center Analyst, and also completed my previous employer's Quality Advocate Certification which focused on Six Sigma and Lean concepts. Prior to leaving the company, I was being considered for a company sponsored training in the Six Sigma Green or Black Belt program. I've recently started working a contract position as a Customer Service Rep, processing orders, but the company will be completing an SAP conversion in May 2013; so only a few months away. The problem I have in this position is that I feel frustrated in learning their current software when their entire team seems to have their own personal ways of doing their job. I prefer to have structure and perform job duties the right way, then building on that to make the job more streamlined. I spoke with my recruiter but he feels I may be a bit premature on feelings about working in this contract position. I may be just feeling a little impatient in having to wait another 3 months to see if the company may even hire me on permanently and what role I would have with SAP, beyond Customer Service Rep. I'm hoping to get some direction from the SAP community on where I might focus my attention in learning SAP. My hope is to find a position working with SAP like the one I enjoyed so much back in GA. I'm even considering options to learn the programming side. I think SAP is a great software package once people understand how it's designed, or can be designed, to work.
    Please help!!
    I'd be happy to provide my resume to anyone willing to review it and give me some pointers. Any advice would be greatly appreciated!

    I appreciate the length and detail of your post. I struggle answering questions from folks who give too little info. It's refreshing to have too much info for a change.
    I'll summarize your post and give suggestions:
    You have very strong end user experience, almost bordering on support level SD knowledge. You have experience with the way that at least one company implemented SAP SD but don't have many years of experience with different approaches, so you can't pitch yourself as someone who's "been-there, done-that" outside of the SD world and you can't bill yourself as having SD functional knowledge to the extend that you could be a consultant for SAP SD.  (See FAQ: Different Career Paths in SAP for descriptions of different traditional SAP career paths.)
    You've moved to Southern California, which is chock full of companies using SAP, by the way, and you're having a hard time finding the right job. Your education is probably going to be problematic at this point. Most SAP related jobs require a Bachelor's Degree at a minimum. Definitely keep on going with your degree. I don't know where you're doing your associate's degree, but you might want to look in to Cal State Fullerton, which has an *excellent* SAP focused business degree program. (http://business.fullerton.edu/).
    You've found work at a company but had to start over at a lower level of responsibility. Since the job you just landed will be transitioning to SAP in 3 months, you have an opportunity to repeat your previous rise by volunteering to be a super-user again. Alternatively, you could talk to the group within your company and express your desire to help out supporting the system from the back end. Traditionally, companies lose a few folks immediately following an implementation, so there's a good chance that if you make your desires and skills known, that you'll be able to move onto the support team once a position opens up.
    All of the above assumes that you want to continue on the functional side of SD. You didn't mention any aptitude or preference for programming. It is certainly easier to get programming jobs than functional jobs (see How did you get your start in SAP?), but it seems like you really enjoyed the functional side of SAP. I do *not* recommend learning an SAP skill for which you have no desire simply to get a job, hoping that you can switch later. Use the skills you have to get the job you really want, doing something that really excites you. It's far to easy to fall into a job simply because it's there and get trapped and burned out.
    Hope this helps!
    Best regards,
      --Tom

  • What is the best way to build a news system?

    Hi everyone,
    I am building a website using webcenter and I need to do a section called "News". The Editor user is going to put on this section some news about the company.
    The doubt is: What is the best way to do is? There is a way to integrate the webcenter with Content Server and store the news as a content on it? Or the best thing to do is treat each news as a page (by using the task flow - Page create new)?
    Thanks
    Daniel

    Hi Daniel,
    I'm not shure if that is the best way, but we're using the Page Service Task Flow and scope.
    If you want to use Oracle Content Server(ucm) probably your user must create a doc(news) and upload it by using something like the Library Task Flow.
    Bye...

  • What is the best way to use a SSD for Photoshop/photo editing?

    Computer hardware newbie here: I do a significant amount of photo editing work and for a very long time I've experienced Photoshop, Bridge and Photomatix crashing constantly (usually due to insufficient RAM) or just generally taking forever (Bridge took forever to load the thumbnail/preview extractions in a folder full of images, Photoshop took forever to save images and Photomatix took ages to load/merge a set of bracketed photos).  Here are the typical error messages I'd get: http://pastebin.com/J9byczse
    As a professional photographer, constantly running into that sort of thing is quite aggravating, so to hopefully avoid ever having to deal with that again I invested in a new custom built computer.  It's Windows 7 Professional 64 bit with 32GB of RAM and a 240GB SSD; I'm using the 240GB SSD as my boot drive/OS, all of my programs are installed there, and the page file.  My photos and data are stored on several HDDs.  I have yet to install any of my photo editing software (Photoshop CS6 Extended, Lightroom, Photomatix etc) to the new computer yet since I'd like some advice first.
    My basic question is this: what is the best way to take advantage of the SSD (and the computer in general) when it comes to my photo editing software?
    Specifically...
    1. If I have a folder of photos I'm working on, should I move it to the SSD and then work on them from there in order to take advantage of the speed of the SSD?  Would this make any difference in terms of speed if the photos are located on the SSD vs. an internal/external HDD?
    2. Most of what I've read online seems to recommend two separate SSDs, one for installing/booting the apps and one for cache/scratch.  Does it matter if I use my 240GB SSD for both?
    3. This is a fairly new computer and the SSD is already almost half full (102GB used, 120GB free) *WITHOUT* any of my photo editing software installed yet.  I'm concerned about how fast that remaining 120 GB may fill up.  As it fills up will I lose the speed advantage of the SSD vs. a regular HDD?
    4. Sort of similar to #3, but should I bother moving any of my other non-photo editing programs/caches off of the SSD to a HDD and would there be any major difference in the speed/lifespan of the SSD if I did so?  It's mostly Firefox and Chrome and their caches that I'm concerned may be a problem if they remain on the SSD.
    Thanks for any help!

    If you have an SSD you can run the cache and programs on the same drive.  However, many recommend a scratch disk size of 100-200 gigs so that will not work here unless you opt for a larger SSD.  Otherwise an internal spinner is recommended that does not contain the program files, or idealy any other files that may want to get acessed at same time (only one read/write head per drive).
    With 32 gig of RAM you may not need the constant use of the scratch drive unless working on large images with lots of layers.  So see no advantage to moving folder to SSD for temp work environment.
    From what I read the new crop of SSD do not have the wear problems of the older versions.

  • What's the best way to manage Apple IDs for multiple devices?

    Hi,
    We have
    a shared Macbook air
    a shared iPad
    my iPhone
    his iPhone
    We want to put one ID on the Macbook and iPad that we can use to have the same iMessage on both and that we can put a card on and use in the iTunes store etc.
    We also want to have our own iMessages on our iPhones, plus be able to use the account with the cards on them to purchase and share across devices...
    What's the best way to manage them all?

    Welcome to the Apple Community.
    iTunes is straight forward, just use the same ID on all of them.
    What exactly do you want to see in messages on the Mac and iPad, messages combined from each of your phones or a different account just for both of you.
    You should think about what you want in calendars, contacts etc, on your shared devices.

  • HT2534 I have two class sets of iPad 2s and I would like to set up an iTunes account but don't want to put in my credit card information or individual students' information. What is the best way to set up class sets of iPads?

    I am a K-6 tech teacher and just recieved two classroom sets of iPads. I'm wondering what is the best way to set up iTunes so that apps may be downloaded. I do not want to put my personal information in and I do not want students to put in their informtion either. Teachers want to be able to download free apps and when the school purchases iTunes gift cards, they would like to be able to use them. What is the best way to go about this?
    Thank You!
    Jess

    Contact your IT person. They will help you with provisioning & setting up the iPads and getting apps on them and locking them down so students can only access certain settings and apps.
    I have asked that this post get moved to iPad Enterprise as it is more approriate forum for your question (even though it is about schools))
    Don't create an AppleID yourself and use it to put stuff onto the school iPads. You can't have more than 10 iPads to one iTunes account anyway.

  • What are the best specs when building a PC for video & where to buy in US?

    Our current video machine has died - a problem we have constantly battled over the years with our video machines, primarily from the heat generated in the system. These have been spacious, well spec'd out desktops, so while I'm budget concious I thought I'd reach out for advice before going ahead. The biggest problems occur when  rendering video, esp. larger files.
    Also, I'm visiting the US for a few weeks, so that opens up some new possibilities (it's common to see much better pricing for systems in Canada than the US.)
    So my questions are two-fold.
    1) What would you recommend for buying a PC video machine today, while still on a budget? I would normally look for a higher end i7 processor, 16 Gb DDR3 ram, dedicated video card, ASUS motherboard with raid 0/5 and a couple of decent sized harddrives (not striped... had terrible experiences with my striped drives in the past). In particular, what would you recommend on the video card front for the best value/performance while not creating issues with heat (this is where I've had problems with a number of machines in the past)? In terms of harddrive management, are there some better options now for handling real time editing and rendering? (I would like to connect the 2 harddrives from the machine that has failed to the new machine.)
    2) I'm in Ft. Myers, FL for the next couple of weeks... what are some good options for either having a machine built or getting the parts to build myself? (I don't need an OS, but will install Win 7 Pro myself.) Normally I'd look to TigerDirect or CanadaComputers for a new system.
    My main use for the machine will be Premiere/After Effects, with some Photoshop/Illustrator.
    Any other advice/input on how to optimize the machine so that I don't have HDD issues and other isssues from overheating would be appreciated. Please keep in mind, I'm on a budget (which means I'd ideally like to spend between $800-$1300). :-)
    Thanks!
    Julie

    Build a Desktop Video Editing PC
    -3 price level ideas in http://www.pacifier.com/~jtsmith/ADOBE.HTM
    -what PC to build http://forums.adobe.com/thread/947698
    -2 how to build videos http://forums.adobe.com/thread/1104182
    -another video http://forums.adobe.com/thread/1145366
    -planning & Building http://ppbm7.com/index.php/intro-part-1
    -memory for LGA2011 http://forums.adobe.com/thread/1098759
    -an Adobe FAQ http://forums.adobe.com/thread/878520
    -http://www.shawnlam.ca/2012/premiere-pro-cs6-video-editing-computer-build/
    -http://www.videoguys.com/Guide/E/Videoguys+DIY9+Its+Time+for+Sandy+Bridge+E/0xe9b142f408a2 b03ab88144a434e88de7.aspx
    -several more links http://forums.adobe.com/thread/815798
    -build tuning http://ppbm7.com/index.php/final-results

Maybe you are looking for

  • Bounce Management in SAP CRM 2007

    Hi Experts, we have SAP CRM 2007 and I have a few questions about Bounce Management. It is a very simple scenario, so it´s fine if only hard bounces for incoming EMails are handled. 1) Do you need ERMS for that simple form of Bounce Mgt? 2) Is the Us

  • How can I MOVE some projects from one library to another?

    As the aperture library grows quite big and I want to split it into several smaller ones. How can I move projects from the old library to a new one without export them and re-import them all again? Is it possible to retain all adjustments after migra

  • Mandatory fields for GN_INVOICE_CREATE

    Hi, My requirement is for a given material say 'X', I want to know its netprice. I mean when I create a sales order with material 'X', I get its netprice. I want to know the netprice of this material without creating  a sales order itself. I gathered

  • URGENT:Diagnose The Steps for Creating a Standby Database

    Why Following Steps Can Not Succeed? What are the problems? The Steps of Creating a Physical Standby Database SQL>alter system set db_recovery_file_dest_size=2000m scope=both; SQL>alter system set db_recovery_file_dest='C:\oracle\product\10.2.0/flash

  • TDS not calculating at the time of advance payment to vendor

    hello gurus, need urgent help , TDS not calculating for advance payment made to vendor, checked configuration in detail. payment WT type is marked as central invoicing prop.all other config is o.k. regards, Anand