Non reentrancy for TCP/IP VIs.

I am trying to write a server program that caters to multiple clients. The clients are being made to wait in turn when the data has to be sent back to them. The requests from client are handled by the server pretty
much in the desired multi threaded fashion.
Is it that the every instance that is spawned by the server to handle a particular client request(this is done using reentrancy) is rendered useless because tcp/ip VIs are not re-entrant .Please assist me in correcting my understanding. Also suggest me how to make the server actually catering to multiple clients if tcp/ip VIs are actually a limitation.
Calling LabviewGuru(s) to help.

sumitrishi wrote:
> I am trying to write a server program that caters to multiple clients.
> The clients are being made to wait in turn when the data has to be
> sent back to them. The requests from client are handled by the server
> pretty
> much in the desired multi threaded fashion.
> Is it that the every instance that is spawned by the server to handle
> a particular client request(this is done using reentrancy) is rendered
> useless because tcp/ip VIs are not re-entrant.
Are you sure you see trouble at the TCP Read and TCP Write level? As far
as I can say, they are highly asynchronous and do not block other
instances of VIs calling them as well, at least for different refnums.
Which version of LabVIEW are you using?
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Reentrance in ansynchronously called Vis

    Hi all,
    Recently I've developed an application that heavily utilizes a single GPIB communication SubVI, which writes a query and reads answers from a single device. In order to avoid collisions, I have deliberately set this VI as non-reentrant.
    This SubVI is called by another VI, of course.
    Now please consider this situation: what i run multiple instances of the caller asynchronously? Will the non-reentrance policy be respected? 
    I have hard times debugging the monstrosity I have created and I suspect I deal with collisions here. 
    Please share your thoughts. Thank you.
    EDIT: I'd appreciate if anyone would also share a method of checking whether the GPIB instrument (namely Agilent ENA) is ready for query. I'd implement this mechanism just to be sure the non-reentrance is respected.
    Solved!
    Go to Solution.

    Dear McTom,
    Yes, when you call a non-reentrant VI anywhere in your code, even in asynchronous calls, only one copy will exist, so all other calls to that function will have to wait their turn until the current call finishes executing.
    If you need a more sophisticated approach, allow me to suggest migrating your GPIB communication to another loop. You can create a queue to send requests to this loop, and pass the queue reference to all asynchronous calls. This way, you have the ability to closely monitor the loop status (number of elements in the queue, current element, status) as well as some advanced queue handling (priority messages, flush queue).
    Kind regards:
    Andrew Valko
    National Instruments Hungary

  • SessionBean non-reentrancy?

    Can a SessionBean invoke a method on itself through its local or remote interface without violating the non-reentrancy rule?

    Interesting. Without trying this I'm only speculating, but I would suspect
    the container to throw an EJBException at a.bar(). Have you tried it?
    You could accomplish your goal using the second coding style and configuring
    the bean to use BMT. That would allow bar() to begin/commit/rollback a
    UserTransaction.
    Bill
    "Bjvrn Hamrin" <[email protected]> wrote in message
    news:23318269.1106816185992.JavaMail.root@jserv5...
    Thanks for the reply.
    Ok, having two SessionBeans eliminates any reentrancy problem. What I wasconsidering was having only one, by writing code something like this:
    >
    public class ABean implements SessionBean
    public void foo()
    A a = (A) sessionContext.getEJBLocalObject();
    a.bar();
    This is nearly the same as:
    public class ABean implements SessionBean
    public void foo()
    bar();
    Except that by using the local interface I would expect that transactionattributes and other stuff in deployment descriptors should have effect. In
    my case I don't want any transaction in foo(), but bar() must have a
    transaction.
    >
    /Björn

  • Open VI reference for VITs and VIs

    Hi
    I have a VIT and I get the reference using the Open VI reference. When I change (rename) this back to a VI, and get the reference for it, its much faster. Does the open VI reference takes longer for VITs than VIs in obtaining a reference?
    Another question  is the same VIT, takes lesser time to get the reference using the Open VI reference in LabVIEW 8.5.1. It takes longer in LV8.6. Why is this happening? 
    Thanks
    Vaa San.

    The two main differences between a VI and a VIT are that   VITs are never run, but are templates that generate a VI instance immediately that has all the properties, attributes and limitations of a VI.  A VI on the other hand has only one instance (unless you make it reentrant)
    ·         A VI generated by a VIT is debuggable just like a VI in that you can trace the execution along the wires. In general, a VIT creates a copy of the VI in memory when you open a reference to it. Creating that copy takes time, which affects performance when doing recursion. That copy is then a standard VI in every sense, except it is not a file. Also, if you don't close these references, they will take up space in your RAM. Reentrant VIs can currently only do real recursion in 8.5 and if they are part of a class. If you open a VIT, you don't open the actual file, but a clone. This way you can open it multiple times. Each time you open it, you get a clone. This is especially useful when you open the VIT with VI Server. VIT's are useful to make an interface window once, and use it multiple times in your program. If the code should run multiple times, but doesn't have a user interface, use reentrant VI’s instead. As far as having the project open, a VI will reload all instances related to the project therefore causing the Vi to load slower. Best Regards,
    Juan Galindo
    Applications Engineer
    National Instruments

  • HT2534 When i go to review my apple ID it doesnt have a none selection for payment and it wont let me go on what do i do?

    I had to make a new ID because the old one I have had for years now was not working. So I made a new one under the same e-mail and it said it was not in use. When I go to review it I go through all the steps until I get to the payment and then there is not a none selection for payment.

    Thats how mine is acting right now. I went to an apple store today and they couldnt help me with it. did u end up getting it to work??

  • "initial non-cumulative for non-cumulative values"  is not available in DTP (0AFMM_C02)

    Hi Experts,
    We are working for BI implementation for AFS Industry,
    when we are working on AFS specific inventory cube 0AFMM_C02 , we are facing stock mismatch problem
    for AFS Stock initialization we are using the data source 2LIS_AF_STOCK_INITALIZATION instead of 2LIS_03_BX, this data source is specificly designed for AFS
    when we are extracting the data using 2LIS_AF_STOCK_INITALIZATION for stock initialization and
    2LIS_03_BF data source to load the Moments.
    we compressed cube with Marker update for 2LIS_AF_STOCK_INITALIZATION data load(by deselecting the No marker update check box)
    we compressed cube with No Marker update for 2LIS_03_BF historical data load(by selecting the No marker update check box)
    we compressed cube with Marker update for 2LIS_03_BF Delta data load(by deselecting the No marker update check box)
    Now we are facing stock mistach problem, we found reason for this
    "initial non-cumulative for non-cumulative values" option is not available in DTP only Delta & Full options are available
    and infopackage of  2LIS_AF_STOCK_INITALIZATION data source also has "Full update" instead of "Generate Intial Status"
    Please let us know how can we get the "initial non-cumulative for non-cumulative values" option in the DTP level.
    Regards,
    Chandra

    Hi Chandrakumar,
    We are facing the same problem, how do you solve it?
    Regards,

  • How to handle threading for TCP communicat​ion?

    Hi,
    I've a project to control two separate applications (C++ and LabView) and both of them are implemented as server. Another client program (C++) is used to control those application. The communication among them are implemented using TCP socket. The client program sends message to start or stop some tasks on the servers. The client program also sends time (hh:mm:ss) with the start and stop message to determine when to start or stop.
    In C++ application (server): The application listens for connection and when gets  one, it creates a communication thread to handle that and again listen for another connection. The communication thread handles message passing and when it receives start or stop message, it creates a timer thread with the received time to trigger a task at specified time. And after that it waits for message from the client. So, here, when thread (communication, timer) is needed, it is created.
    In LabView (server): I've tried to create same thing as the C++ server. But, from LabView manual and others forum threads, I got that LabView is multithreading and it can be done using independent loop. So, I'd to create four loops in a diagram:
    1. Listen for new connection
    2. Handle communication for already received connection
    3. Start timer
    4. Stop timer
    and they are run at the beginning of the execution and communication among them are managed using local variables. But, 2,3 and 4th loop can handle only one connection and it can handle another if the current is closed. But, the C++ application can handle more than one connection by creating thread when it is necessary but not at the beginning of the execution of the application.
    Is there a better way to implement this in LabView?
    Is it possible to handle multiple connections and create diagram node/block (like thread) dynamically like C++?
    Thanks.
    Using LabVIEW 2010, Visual C#, Visual C++ (2005, 2008, 2010)
    Solved!
    Go to Solution.

    There are several ways to do this in modern LabVIEW and you should probably search the Example Finder for some TCP examples. The classic way is to transfer the connection refnum from the listen loop to a communication loop that adds it to an array of connection IDs and then continously iterates over this array to do the communication. It works since about LabVIEW 4.0 perfectly for me even for applications with HTTP based communication protocol. But you need to make sure of course that the communciation handling for one connection isn't delaying its work for some reasons as that would delay the handling of the other connections too, as they are really worked on sequentially. If you encounter an error, the connection ID is closed and removed from the array.
    The other is that you create a VI that does your whole communication and terminates itself on an error or when getting the quit command. Make this VI to be reentrant and then launch it through VI server as reentrant instance, passing it the newly received connection refnum form the listen loop. Then use the Run method to let it start and operate like an independant thread.
    For all of these you should be able to find an example in the Example Finder when searching for TCP.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Latest Bioses UEFI and non UEFI for R9 290 GAMING 4G?

    Please post latest bioses UEFI and non UEFI for R9 290 GAMING 4G:
    sn: 602-V308-02SB1312014791
    Thank's

    Svet provided the latest vbios which is TV308MH.131.
    Quote from: gjamie86 on 26-May-15, 22:02:09
    I found a more recent file though at techpowerup (015.044.000.005.000000) Build date 2014-02-18 00:22:00.
    You can't flash any random vbios. Even if it is offered for the same model at techpowerup. Any batch of the same card model can require a different vbios version. Only MSI or the staff here can tell you which version matches. The version informations taken from gpu-z (like 015.044.000.005.000000) are irrelevant and do not represent any real vbios version. Besides TV308MH.131 that has been provided is dated 08/13/14 (Month-Day-Year).
    Quote from: gjamie86 on 26-May-15, 22:02:09
    Last question, can I flash bios #2 as well or is that locked ?
    The card offers a UEFI/GOP and a legacy vbios to switch between. Both could be updated (if there would be later versions what is not the case).
    EDIT: gjamie86, just realized that you hijacked this thread. open an own topic and provide the S/N of card and current (original) vbios saved to file. >>Please read and comply with the Forum Rules.<<

  • HT2534 Why isn't there a 'none' option for my payment information?

    I have a debit card on my iTunes account and I added it a while ago. Now it is saying that my security code isn't valid so I just want to get my debit card off of my iTunes account COMPLETELY. My problem is that I can't find the 'none' option for payment method information. HELP ME PLEAASE!! "/

    For the security code issue, try here >  iTunes Store: My credit card's security code or zip code does not match my bank's records
    The None option is available from the iTunes Edit Payment Information window.
    With iTunes open, from the menu bar top of your screen click Store > Sign In
    Now go back to the menu bar click Store > View My Account. Enter your password click View Account.
    Now click Edit to the right of Payment Type.
    Be aware, the None option is not available in all countries.

  • Make a filed Non-Editable for specific Users

    Hi Experts
    Any Idea How can I make fields of any Table non-editable for a specific Group of Users.
    My Requirement
    I have 4 fields namely, Customer Name, Address, Pincode,City which at time of creation is open to user but once updated and customer is created,  I need to make it non-editable for a specific Group of user.
    Please advice.
    Regards
    Prashant

    Hello Neethu,
    I just wanted to confirm one of the sentence in the above post.
    I feel that the option 2 can also be achieved (Once record is approved and gone through all processes of WF and saved in MDM.Specific users should not modify the record.)
    For this we need to create validation where we need to mention the User
    Just create a Status field and write an expression as
    IF(STATUS FIELD [RECORD]=STATUS[DONE] AND UPDATED BY="USER NAME",FALSE,TRUE)
    for this the automatic execution type property should be set to error.
    Only difficulty is that we need to mention all the users for whome we want to remove the write access once the record is saved.
    Rgds,
    Prasad.

  • How to make a table column block editable for a row and remain non editable for other row based on some condition

    hi ,
    i need help on the below scenario ,
    we have a web dynpro table with different columns, now based on new business requirement  one of the column need to     
    dynamically editable or non editable for different row.
    for ex :
    Field 1
    Field 2 ( Dynamic field )
    Field 3
    Field 4
    Data 11
    Data 12 ( Editable with Drop down   )
    data 13
    data 14
    Data 21
    Data 22 ( Non editable )
    Data 23
    data 24
    Data 31
    data  32 ( Editable with drop down )
    data 33
    data 34
    how to achieve this ? please help on this.
    Thanks in advance
    Thanks
    Manish

    Manish,
    there is no proper way to insert two Cell Editors in a column(except variants), have a look on below scenario, it may help.
    add one more attribute to your table context node for read-only.
    create dropDown as celleditor for table and bind with newly created attribute to read-only property of dropdown.
    before binding data to table, check the condition then mention readonly value abap_true / false.
    @ we can achieve by the use of Variants.
    for ex :
    Data 11
    Data 12 ( Editable with Drop down)
    data 13
    read-only - abap_false
    Data 21
    Data 22 ( Non editable, dropdown )
    Data 23
    read-only - abap_true
    Data 31
    data  32 ( Editable with drop down )
    data 33
    read-only - abap_false

  • Ship to party should be editable and Non-Edutable for Diff sales org.

    Hi,
    When i create SO with Refto QT then i want Sold to Party Field should be Edtable for Domestic sales org and non-editable for Export Sales org.
    so pls help me on the same.

    Hi,
    Hi,
    Go to SE16N >> Put table TPAER
    Tick mark to Maintain entry ( If it is display mode put command &SAP_EDIT and enter)
    Maintain sales document procedure TA and partner function SP and execute
    Then remove X from not changeable column and save
    Note : After this you have to block VOPA - Partner determination other wise some one run this t-code then X indicator is reset automatically as it is defaulted by program.
    Kapil

  • Sold to party field should be editable and non-Editable for diff sales org

    Hi,
        in creation of SO,i want SP field should be editable for Domestic sales org and Non Editable for Export sales org.
    please help on this.

    Dear Mohanty,
    In sales order, for domestic sles SP is editable - It is Normal process.
    Non Editable for Export sales org.
    In this how user will enter the sold to party while creating sales order.
    And did you create export customer classification in Sales org rather Distribution channel.
    Regards,
    Mani

  • Installable for Oracle Tuxedo Mainframe Adapter for TCP (CICS)

    Hi,
    Could anyone please help me to find the installable for "Oracle Tuxedo Mainframe Adapter for TCP (CICS)", does this comes with the Tuxedo 10g installable or is it a separate plug-in that I need to download and install.
    Regards,
    Priyanka

    Hi Priyanka,
    The Tuxedo Mainframe Adapters are separably licensed products and not included in the Tuxedo kits. I'm not certain the mainframe adapters are yet available for 10gR3 (I'm checking on this), and for whatever reason the latest version I can find for download is the 9.1 version that can be downloaded from eDelivery.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • LV2009 hooks for customizing override VIs and accessor VIs

    In LV2009, if you use LabVIEW Object-Oriented Programming, you may wish to customize the VIs that are created for New>>VI For Override and New>>VI For Data Member Access. Using scripting, you can do so by editing the four VIs listed below.  These VIs are called at the end
    of their respective scripting processes and you are free to include any
    scripting code you wish to further customize the VI in question. Some
    common customizations you might want include changing the VI name (use
    "get" and "set" instead of "read" and "write"), modifying the icon,
    adding additional diagram logic, etc.  You cannot edit the callers of
    these three VIs, but these three  provide the hook you need to
    customize your new VIs as you want them.
    Customizations for Override VIs:
    <labview>\resource\Framework\Providers\LVClassLibrary\NewAccessors\OverrideRetooler\Custom
    User Scripting For New Override VI.vi
    Customizations for basic accessor VIs:
    <labview>:\resource\Framework\Providers\LVClassLibrary\NewAccessors\BaseAccessorScripter\Custom
    User Scripting For New Simple Accessor VI.vi
    Customizations for 1D Array element accessor VIs:
    <labview>resource\Framework\Providers\LVClassLibrary\NewAccessors\ArrayElementScripter\Custom
    User Scripting For New Array Element Accessor VI.vi
    Customizations for multi-dim array element accessor VIs:
    <labview>\resource\Framework\Providers\LVClassLibrary\NewAccessors\MultiDimArrElemScripter\Custom
    User Scripting For New MultiDim Array Element Accessor VI.vi

    Oooh, I finally smell a reasonable by-ref implementation coming - the lack of this option always annoyed me and now I should hopefully be able to easily build the code which will generate the wrapper needed for the by-ref stuff.
    Try to take over the world!

Maybe you are looking for